
using Core.Toolkit.Core.Entitys;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Core.SimpleTemp.Entitys
{

    /// <summary>
    /// 隐患_隐患台账
    /// </summary>
    public class YH_StandingBook : Entity
    {
        #region *新增字段
        /// <summary>
        /// 台账状态(待确认/待整改/整改中/待验收/验收通过/验收退回)
        /// </summary>
        [StringLength(20)]
        public String State { get; set; }
        /// <summary>
        /// 台账分类(计划/非计划/外部机构/法律法规)
        /// </summary>
        [StringLength(20)]
        public String StandingBookClass { get; set; }
        /// <summary>
        /// 整改期限
        /// </summary>
        public DateTime? DeadLine { get; set; }
        /// <summary>
        /// 隐患台账编码
        /// </summary>
        [StringLength(50)]
        public String StandingBookNo { get; set; }
        /// <summary>
        /// 排查大类代码
        /// </summary>
        [StringLength(20)]
        public String SearchMajorCode { get; set; }
        /// <summary>
        /// 排查标准ID
        /// </summary>
        public Guid? StandardID { get; set; }
        /// <summary>
        /// 排查标准内容
        /// </summary>
        public String StandardContent { get; set; }
        /// <summary>
        /// 上报是否重大隐患
        /// </summary>
        public bool IsMajorDanger { get; set; }
        /// <summary>
        /// 重大隐患结果
        /// </summary>
        [StringLength(500)]
        public String MajorDanger { get; set; }
        #endregion


        /// <summary>
        /// 上报分类(0计划/1非计划/2外部机构)
        /// *来源(知识库/基础库/手工)20191114，孙姐pd
        /// </summary>
        [StringLength(20)]
        public String Type { get; set; }
        /// <summary>
        /// 隐患计划排查明细ID
        /// </summary>
        public Guid? ScreeningPlanProDetailId { get; set; }
        /// <summary>
        /// 机构类别
        /// </summary>
        [StringLength(200)]
        public String InstitutionTypes { get; set; }
        /// <summary>
        /// 单位名称
        /// </summary>
        [StringLength(20)]
        public String CompanyName { get; set; }
        /// <summary>
        /// 发现人
        /// </summary>
        public Guid? Discoverer { get; set; }


        /// <summary>
        /// 带班长
        /// </summary>
        //public Guid? Monitor { get; set; }
        /// <summary>
        /// 带班长审批意见
        /// </summary>
        //public String ApprovalOpinion { get; set; }
        /// <summary>
        /// 带班长审批时间
        /// </summary>
        //public DateTime? ApprovalDate { get; set; }
        /// <summary>
        /// 组织类别
        /// </summary>
        [StringLength(20)]
        public String OrganizationType { get; set; }
        /// <summary>
        /// 隐患发现时间
        /// </summary>
        public DateTime? DiscoveryTime { get; set; }
        /// <summary>
        /// 检查类别
        /// *pd 为String[20]
        /// </summary>
        [StringLength(20)]
        public String InspectType { get; set; }
        /// <summary>
        /// 隐患所属区域
        /// </summary>
        public Guid? RiskRegion { get; set; }
        /// <summary>
        /// 隐患位置
        /// *pd为guid
        /// </summary>
        public Guid? RiskPosition { get; set; }
        /// <summary>
        /// 隐患分类
        /// </summary>
        public Guid? RiskType { get; set; }
        /// <summary>
        /// 隐患等级ID
        /// </summary>
        public Guid? RiskLevel { get; set; }
        /// <summary>
        /// 隐患描述
        /// </summary>
        [StringLength(100)]
        public String RiskDescription { get; set; }
        /// <summary>
        /// 是否为重大隐患
        /// </summary>
        public bool IsMajor { get; set; }
        /// <summary>
        /// 是否涉及承包商
        /// </summary>
        public bool HaveContractor { get; set; }
        /// <summary>
        /// 承包商名称ID
        /// </summary>
        public Guid? Contractor { get; set; }
        /// <summary>
        /// 整改目标或方案
        /// </summary>
        [StringLength(100)]
        public String RectificationCase { get; set; }
        /// <summary>
        /// 整改资金
        /// </summary>
        public double RectificationFund { get; set; }
        /// <summary>
        /// 整改责任部门
        /// </summary>
        public Guid? Department { get; set; }
        /// <summary>
        /// 整改责任人
        /// </summary>
        public Guid? RectificationLeading { get; set; }
        /// <summary>
        /// 整改人
        /// </summary>
        public Guid? Rectificationer { get; set; }
        /// <summary>
        /// 计划完成时间
        /// </summary>
        public DateTime? PlanTime { get; set; }
        /// <summary>
        /// 是否制定应急预案
        /// </summary>
        [StringLength(20)]
        public String HaveContingencyPlan { get; set; }
        /// <summary>
        /// 应急预案内容
        /// </summary>
        [StringLength(100)]
        public String EmergencyPlan { get; set; }
        /// <summary>
        /// 当前控制措施
        /// </summary>
        [StringLength(1000)]
        public String CurrentPlan { get; set; }
        /// <summary>
        /// 整改描述
        /// </summary>
        [StringLength(1000)]
        public String RectificationDescription { get; set; }
        /// <summary>
        /// 实际完成时间
        /// </summary>
        public DateTime? ActualTime { get; set; }
        /// <summary>
        /// 指定验收人
        /// </summary>
        public Guid? Acceptancer { get; set; }
        /// <summary>
        /// 验收意见
        /// </summary>
        [StringLength(1000)]
        public String ApprovalResult { get; set; }
        /// <summary>
        /// 验收部门
        /// </summary>
        public Guid? AppointDepartment { get; set; }
        /// <summary>
        /// 验收用户
        /// </summary>
        public Guid? AppointPerson { get; set; }
        /// <summary>
        /// 验收时间
        /// </summary>
        public DateTime? AppointTime { get; set; }
        /// <summary>
        /// 状态（保存/提交）
        /// 作废
        /// </summary>
        [StringLength(20)]
        public String Status { get; set; }
        /// <summary>
        /// 隐患进度(/0待审批/1已生效/2审批退回/3验收通过/4验收退回)
        /// *台账状态(/待确认/待整改/整改中/待验收/验收通过/验收退回)
        /// 作废20200114
        /// </summary>
        [StringLength(20)]
        public String Schedule { get; set; }
        /// <summary>
        /// 隶属工厂
        /// </summary>
        public Guid? CreateFactory { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Guid? CreateDept { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Guid? UpdateDept { get; set; }
        /// <summary>
        /// 隐患附件
        /// </summary>
        public ICollection<YH_StandingBookAttachment> YH_StandingBookAttachment { get; set; }
        /// <summary>
        /// 台账流转记录
        /// </summary>
        public ICollection<YH_StandingBookProcess> YH_StandingBookProcess { get; set; }
        /// <summary>
        /// 隐患_隐患排查明细
        /// </summary>
        //public ICollection<YH_ScreeningDetail> YH_ScreeningDetail { get; set; }

    }
}
